<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>文献资源管理系统-参数管理</title>
<link rel="icon" href="favicon.ico" type="image/ico">
<meta name="keywords" content="文献资源管理系统-参数管理">
<meta name="description" content="文献资源管理系统-参数管理">
<meta name="author" content="yinqi">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/materialdesignicons.min.css" rel="stylesheet">
<link href="css/style.min.css" rel="stylesheet">
<link href="icon/iconfont.css" rel="stylesheet">
<script src="https://cdn.bootcss.com/vue/2.6.9/vue.min.js"></script>
<script src="https://cdn.bootcss.com/axios/0.19.0/axios.min.js"></script>
</head>
  <style>
    .col-lg-12{
      margin: auto;
    top: 17px;
    left: 0;
    bottom: 0;
    right: 0;
    position: absolute;
    }
    .right {
        width: 78%;
        height: 530px;
        border: 1px solid #ccc;
        float:left;
    }
    .el-scrollbar .el-scrollbar__wrap {
      overflow-x: hidden;
      }
  </style>
<body>
<div class="lyear-layout-web" id="app">
  <div class="lyear-layout-container">
    <!--左侧导航-->

    <!--End 左侧导航-->
    
    <!--头部信息-->
 
    <!--End 头部信息 <i class="mdi mdi-pencil"></i>  class="iconfont iconall"-->
    
    <!--页面主要内容-->

    <main class="lyear-layout-content" >
      <div class="content_wrap">
        <div class="right">
          <div class="card-header"><h4>单条荐购</h4>
            <a class="btn btn-success m-r-5" type="warning"  style="float: right;"   @click="piPurchase()" data-target="#myModal3"><i class="mdi mdi-pencil"></i>批量荐购</a>
          </div>
          <div class="card-body">
            <form action="lyear_forms_elements.html" method="post" onsubmit="return false;">
              <div class="form-group">
                <label for="example-nf-email">题名</label>
                <input class="form-control" type="email" id="example-nf-email" v-model="purchase.title"  placeholder="题名">
              </div>
              <div class="form-group">
                <label for="example-nf-email">PISSN</label>
                <input class="form-control" type="email" id="example-nf-email" v-model="purchase.pissn"  placeholder="PISSN">
              </div>
              <div class="form-group">
                <label for="example-nf-email">EISSN</label>
                <input class="form-control" type="email" id="example-nf-email" v-model="purchase.eissn"  placeholder="EISSN">
              </div>
              <div class="form-group">
                <label for="example-nf-email">PISBN</label>
                <input class="form-control" type="email" id="example-nf-email" v-model="purchase.pisbn"  placeholder="PISBN">
              </div>
              <div class="form-group">
                <label for="example-nf-email">EISBN</label>
                <input class="form-control" type="email" id="example-nf-email" v-model="purchase.eisbn"  placeholder="EISBN">
              </div>
              <div class="form-group">
                  <a class="btn btn-primary m-r-5" type="warning" @click="toaddOne()"><i class="mdi mdi-check"></i>荐购</a>
               </div>  
            </form>
          </div>
        </div>
     </div>
      
      
    </main>
    <!--End 页面主要内容-->
     <!-- 子节点编辑模态框（Modal） -->
   
  </div>
</div>
<script>
  new Vue({
    el:"#app",
    data:{
        purchase:{}
    },
    created () {
         
    },
    methods: {
        toaddOne(){
          axios.post(`http://29n01o8660.oicp.vip/purchase/selectRepeation`,this.purchase).then(res=>{
               console.log(res);
               if(res.data.flag){
                  alert(res.data.message);
                  alert(res.data.data);
                  window.localStorage.setItem("id",res.data.data);
                  location="addOne.html";
               }
            })
        },
        piPurchase(){
            location="pipurchaseList.html";
        }

    }
      })
</script>
</body>
</html>